using System;
using System.Collections.Generic;
using System.Drawing;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace GURUCORE.Portal.AspNet.Control
{
    
    [DefaultProperty("Source"),
    ToolboxData("<{0}:IFrame runat=server></{0}:IFrame>")]
    [ToolboxBitmap("resGURUCORE.ico")]
    [Description("Server side iFrame ")]
    public class iframe : System.Web.UI.WebControls.WebControl
    {
        private string text;
        private string source;

        [Bindable(true),
        Category("Appearance"),
        DefaultValue("")]
        public string Text
        {
            get
            {
                return text;
            }

            set
            {
                text = value;
            }
        }

        [Bindable(true),
        Category("Appearance"),
        DefaultValue("")]
        public string Source
        {
            get
            {
                return source;
            }

            set
            {
                source = value;
            }
        }

        /// <summary> 
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        protected override void Render(HtmlTextWriter output)
        {
            output.Write("<iframe src=\"" + source + "\" width=\"100%\" height=\"100%\"></iframe>");
        }
    }
}
